namespace SimpleWebServices
{
    public sealed class SealedClassTest<T> : ITestExpectation
    {
        public bool Value
        {
            get;
            set;
        }

        public bool Check()
        {
            if (this.Value != typeof(T).IsSealed)
            {
                if (this.Value)
                {
                    throw new TestException(typeof(T).Name + " is not a sealed class.");
                }
                else
                {
                    throw new TestException(typeof(T).Name + " unexpectedly is a sealed class.");
                }
            }

            return true;
        }
    }
}